CaptureForm Expression Functions

You can choose any number of built-in functions to help construct your expression.

Date & Time

Function Description Returns
FormatDate(Date) Returns a date formatted using the format parameter.
Ex: FormatDate("11/16/08", "mmm d, yyyy"); Result = Nov 16, 2008
FormatDate(Date)
Now() Returns the current system date and time. Now()

Logical

Function Description
IsNull() Returns true if the expression being evaluated is null.
Ex: IsNull(LastName)
If(Exp,X,Y) Returns X if expression Exp is TRUE. Returns Y otherwise. You can use database fields, other functions or plain text as your values for X and Y. IF statements can also be nested within other IF statements.
Ex: If(DataField1 = 23, DataField2, Print this text)

String

Function Description
Length(string) Returns the length of a string.
Ex: Length('abcde'); Result = 5
PadLeft(string, padstring, length) Fills the input string from the left by repeating the pad string to reach the specified length.
Ex: PadLeft('abcde','xy',20); Result = xyxyxyxyxyxyxyxabcde
PadRight(string, padstring, length) Fills the input string from the right by repeating the pad string to reach the specified length.
Ex: PadRight('abcde','xy',20); Result = abcdexyxyxyxyxyxyxyx
Replace(string, search string, replace string) Replaces all occurrences of 'Search String' in 'String' with 'Replace String'.
Ex: Replace('aabbccddeeffggaa', 'aa', 'zz'); Result = zzbbccddeeffggzz
SubString(string, index, count) Returns a substring (of length="count") beginning at position "index" .
Ex: SubString('abcdefghijklmnopq',3,4); Result = cdef
Trim(string) Trims whitespace from the front and back of a string.
Ex: Trim ('      abccde       '); Result = abcde
TrimL(string) Trims whitespace from the front of a string.
Ex: TrimL('      abcde         '); Result = abcde
TrimR(string) Trims whitespace from the back of a string.
Ex: TrimR('     abcde       '); Result =           abcde